// const time = require('./router/time')
// const blog = require('./router/blog')
// const home = require('./router/home')

const path = require('path') // 找路径
const fs = require('fs') // 读文件

console.log(path.join(__dirname, './router', 'user.js'))

const arr = []
fs.readdir('./router', (err, data) => {
	// console.log('data:', data)
	data.forEach((item) => {
		console.log(item, 'item')
		let modelName = require(path.join(__dirname, './router', item))
		console.log(modelName)
		arr.push(modelName)
	})
	console.log(arr, 'arr')
})
